package demo2;

public class Test {

    public static void drawMap(Shape shape) {
        shape.draw();
    }

    public static void main(String[] args) {
        //多态
        drawMap(new Cycle());
        drawMap(new Rect());
        System.out.println("=======");
        Cycle cycle = new Cycle();
        drawMap(cycle);
        cycle.draw();
        System.out.println("=======");
        new Rect().draw();
        new Cycle().draw();

    }












}
